/*
 * Copyright © 2021 http://www.TestCopyright.com/ All rights reserved.
 */
package com.xjh.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xjh.utils.base.BasePO;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： 徐建华
 * @date： 2021/11/28
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */

@Data
@Entity
@Table(name = "jpa_student")
//@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class JpaStudent  implements Serializable{


    @Id
    private Long id;
    @Column
    private String stuName;
    @Column
    private String stuSex;
    @Column
    private Date stuBirthday;
    @Column
    private Long classId;
    /**
     * 是否可用: 0-已删除;1-正常
     */
    @Column
    private Integer isEnable;

    /**
     * 创建人
     */
    @Column
    private Long createBy;


    /**
     * 创建时间
     */
    @Column
    private String createTime;

    /**
     * 修改人
     */
    @Column
    private Long updateBy;


    /**
     * 修改时间
     */
    @Column
    private String updateTime;
    // mappedBy对应从表中的主表实体的名称
    @OneToMany(mappedBy = "jpaStudent",cascade= CascadeType.ALL)

    private List<JpaAccount> jpaAccountList;// 学生拥有的账户列表

}
